﻿<%@include file="/util/tag.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <%@include file="./WEB-INF/common/head.jsp"%>
        <script type="text/javascript">
        		function validate(){
        						var b1 = $("#admin_code").required('账号不能为空',$('#acode_msg'));
        						var b2 = $("#admin_pwd").required('密码不能为空',$('#apwd_msg'));
        						var b3 = $("#vcode").remote('verifyCode','验证码错误',$('#vcode_msg'));
        						if(b1&&b2&&b3){
        							$("#logform").submit();
        					    }
        					
        					}
        					function keydown(e){
        						if(e.keyCode==13){
        							validate();
        						}
        					}
    </script>
    <body class="index" onkeydown="keydown(event);">
        <div class="login_box"><form action="login" method="post" id="logform">
            <table>
                <tr>
                    <td class="login_info">账号：</td>
                    <td colspan="2"><input name="admin.code" type="text" value="admin" class="width150" id="admin_code"/></td>
                    <td class="login_error_info"><span class="required" id="acode_msg"></span></td>
                </tr>
                <tr>
                    <td class="login_info">密码：</td>
                    <td colspan="2"><input name="admin.password" type="password" value="admin"  class="width150" id="admin_pwd"/></td>
                    <td><span class="required" id="apwd_msg"></span></td>
                </tr>
                <tr>
                    <td class="login_info">验证码：</td>
                    <td class="width70"><input name="checkCode" type="text" value="${check_code}"  class="width70" id="vcode"/></td>
                    <td><img src="checkCode" alt="验证码" title="点击更换"  onclick="this.src='checkCode?#'+(new Date()).getTime();"/></td>  
                    <td><span class="required" id="vcode_msg">${codeMsg}</span></td>              
                </tr>            
                <tr>
                    <td></td>
                    <td class="login_button" colspan="2">
                        <a href="javascript:;" onclick="validate();"><img src="images/login_btn.png" onclick=""/></a>
                    </td>    
                    <td><span class="required">${errorMsg }</span></td>                
                </tr>
            </table></form>
        </div>
    </body>
</html>
